(function(){
    var e = document.getElementsByClassName("caret");
    for(var i = 0,len = e.length;i < len;i++){
        e[i].addEventListener("mouseover",function () {
            this.getElementsByTagName("ul")[0].style.display = "block";
        });
        e[i].addEventListener("mouseout",function () {
            this.getElementsByTagName("ul")[0].style.display = "none";
        });
    }
})();